package com.niiwoo.civet.trade.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created by zhangwanli on 2017/11/29.
 */
@Getter
@AllArgsConstructor
public enum InvestFlowConfigTypeEnum {
    SOLDOUT_DISABLED_AUTO_INVEST((byte) 1, "投资列表-无标可投时-未开启自动投资"),
    SOLDOUT_ENABLED_AUTO_INVEST((byte) 2, "投资列表-无标可投时-已开启自动投资"),
    SPEEDLOAN_INVEST_SUCCEED((byte) 3, "极速借投资成功"),
    PRACTICE_INVEST_SUCCEED((byte) 4, "体验标投资成功"),
    WITHOUT_RED_ENVELOPE((byte) 5, "选择红包页面-暂无红包"),
    ME_INVEST((byte) 6, "我-投资（5.10版本新增）"),
    SOLDOUT_TRANSFER_INVEST((byte)7,"转让区-无标可投时");

    private final Byte value;
    private final String desc;

    public static InvestFlowConfigTypeEnum enumOf(Byte value) {
        for (InvestFlowConfigTypeEnum typeEnum : values()) {
            if (typeEnum.value.equals(value)) {
                return typeEnum;
            }
        }
        throw new NoSuchEnumValueException("InvestFlowConfigTypeEnum:" + value);
    }

}
